package com.smartstate.ems.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smartstate.ems.dto.PageDTO;
import com.smartstate.ems.entity.Permission;
import com.smartstate.ems.vo.ResultVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PermissionService extends ServiceBase<Permission>{

    List<Permission> findAll();

    ResultVO<List<Permission>>  getPerByRoleID(String roleID);

    Page<Permission> getPermByNameAndStatus(String name,String status,PageDTO<Permission> pageDTO);

    ResultVO<Permission> addChildOrFather(Permission permission);

    Boolean updateByPermID(Permission permission);

    Boolean delByID(String id);

    Boolean updateStatuByID(String id ,String status);

    Boolean delBatchByIDs(List<String> ids);

    List<Permission> lazyLoadMeun(String id);

    ResultVO<List<Permission>> loadAllMeun();

    List<Permission> findPermissionByUserId(String id);
}
